<?php

/* The table of supported languages for the counter, data about them,
and some functions to manipulate them */

# List of languages, indexed by ISO 639 / RFC 3066 tags.
# Each element is an array. Elements:
# 0 - Locale name
# 1 - Language name
# 2 - Language name enclosed in _( ) for xgettext
#
# This file is intended for use before language is decided, so it will
# likely be wrong - code should use elm 1 and call gettext on it.

# not yet distinguishing nl-NL from nl-BE....
$languages["pt_BR"] = array("pt_BR.utf8", "Brazilian Portuguese", _("Brazilian Portuguese"));
$languages["da"] = array("da_DK.utf8", "Danish", _("Danish"));
$languages["nl"] = array("nl_NL.utf8", "Dutch", _("Dutch"));
$languages["en"] = array("en_US.utf8", "English", _("English"));
$languages["fi"] = array("fi_FI.utf8", "Finnish", _("Finnish"));
$languages["fr"] = array("fr_FR.utf8", "French", _("French"));
$languages["de"] = array("de_DE.utf8", "German", _("German"));
$languages["el"] = array("el_GR.utf8", "Greek", _("Greek"));
$languages["hu"] = array("hu_HU.utf8", "Hungarian", _("Hungarian"));
$languages["it"] = array("it_IT.utf8", "Italian", _("Italian"));
$languages["no"] = array("no_NO.utf8", "Norwegian", _("Norwegian"));
$languages["ro"] = array("ro_RO.utf8", "Romanian", _("Romanian"));
$languages["ru"] = array("ru_RU.utf8", "Russian", _("Russian"));
$languages["sr"] = array("sr_YU.utf8", "Serbian", _("Serbian"));
$languages["es"] = array("es_ES.utf8", "Spanish", _("Spanish"));


#-------------------- FUNCTIONS ------------------------

function languages_supported()
{
  global $languages;
  return array_keys($languages);
}

function language_locale($language)
{
  global $languages;
  return $languages[$language][0];
}
function language_name($language)
{
  global $languages;
  return gettext($languages[$language][1]);
}
